Skip to main content

All Questions

3votes
1answer
409views

Find number of ways to traverse matrix of 0's and 1's

I solved a Daily Coding Challenge, but i suspect my code could be optimised. The challenge is the following: You are given an N by M matrix of 0s and 1s. Starting from the top left corner, how many ...
John Doe's user avatar
1vote
1answer
225views

Exercism: Class representation of a matrix in Python

The task is to represent a Matrix as a class and to instantiate it from a string such as "1 2 3 4\n5 6 7 8\n9 8 7 6" The class must provide methods for ...
Konstantin Kostanzhoglo's user avatar
11votes
4answers
16kviews

Python 3 function to rotate an image 90°

A coding challenge that rotates an image 90 degrees counterclockwise. The image is represented as an array matrix. I believe the time complexity is O(n2), but I'd like to know for sure, as well as any ...
MadHatter's user avatar
6votes
1answer
1kviews

Matrix rotation algorithm - follow-up

In a response to this post I wrote a solution in Python. It passed all the test cases given, so I would like help making it more pythonic and reducing the almost repeated lines. Link to the source of ...
spyr03's user avatar
  • 3,042
4votes
3answers
3kviews

Project Euler 81 (minimum path sum through a matrix)

Problem Statement: In the 5 by 5 matrix below, 131 673 234 103 18 201 96 342 965 150 630 803 746 422 111 537 699 497 121 956 805 732 524 37 331 ...
mleyfman's user avatar

close